Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nixos: make fstab owner/user/users mount options assert setuid mount/umount #9998

Closed
wants to merge 1 commit into from

Conversation

khumba
Copy link
Contributor

@khumba khumba commented Sep 22, 2015

Otherwise, the fstab flags will be present, but the mounting abilities
won't be granted to non-root users. Fixes #9848.

@vcunat
Copy link
Member

vcunat commented Sep 22, 2015

This looks nice to me.

@edolstra
Copy link
Member

Hm, not sure if we want to promote the use of setuid mount... (See my comment at #9848 (comment)).

@@ -134,6 +134,22 @@ in

config = {

assertions = [
{ assertion =
builtins.any (fs: [] != intersectLists (splitString "," fs.options)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be any, not builtins.any. Idem for the other uses of builtins.

Copy link
Contributor Author

@khumba khumba Sep 22, 2015 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

@khumba khumba Sep 22, 2015 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@khumba
Copy link
Contributor Author

khumba commented Sep 22, 2015 via email

…umount

Otherwise, the fstab flags will be present, but the mounting abilities
won't be granted to non-root users.  Fixes NixOS#9848.
@vcunat
Copy link
Member

vcunat commented Sep 22, 2015

Security: IMHO one advantage is the reduction of code runnable as root to tools/daemons specialized for that.

@lucabrunox
Copy link
Contributor

👍 gives hint to the user about a quite widespread option in linux systems.

@edolstra
Copy link
Member

edolstra commented Oct 2, 2015

I'm 👎. I don't think we should introduce a legacy mechanism like setuid mount. It will lead to people giving users bad advice ("if you want to mount a USB stick, just make mount setuid and add a user entry to fstab") while there is a mechanism that doesn't rely on setuid and is better integrated with modern desktop environments (udisks).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants